package com.mk.dao.config;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import java.util.List;
import org.springframework.context.annotation.Configuration;

/**
 * SQL注入器
 *
 * @author fuc
 * @since 2022/03/24
 */
@Configuration
public class MySqlInjector extends DefaultSqlInjector {

    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
        List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
        methodList.add(new HardDeleteById("hardDeleteById"));
        methodList.add(new HardDelete("hardDelete"));
        methodList.add(new HardDeleteByIds("hardDeleteByIds"));
        return methodList;
    }
}
